//
//  CashdrawalController.m
//  LiquorChain
//
//  Created by apple on 2019/1/5.
//  Copyright © 2019年 王冬. All rights reserved.
//

#import "CashdrawalController.h"

@interface CashdrawalController ()
@property (nonatomic,strong) UITextField *bankTextFiled;
@property (nonatomic,strong) UITextField *moneyTextFiled;
@property (nonatomic,strong) UITextField *passwordTextFiled;
@end

@implementation CashdrawalController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"提现";
    self.view.backgroundColor = BACKGROUNDCOLOR;
    UIView *backView =[[UIView alloc]init];
    backView.backgroundColor =[UIColor whiteColor];
    [self.view addSubview:backView];
    [backView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(kNavBarHeight+15);
        make.height.mas_equalTo(SCREEN_HEIGHT-kNavBarHeight-15);
       
    }];
    UIImageView *headImageView =[[UIImageView alloc]init];
    [backView addSubview:headImageView];
    headImageView.image =[UIImage imageNamed:@"tixian"];
   // headImageView.backgroundColor =[UIColor redColor];
    [headImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(80);
        make.top.mas_equalTo(40);
        make.centerX.mas_equalTo(backView.mas_centerX);
    }];
    UILabel *moneyLabel =[[UILabel alloc]init];
    [backView addSubview:moneyLabel];
    moneyLabel.text = @"12.00";
    moneyLabel.textAlignment = NSTextAlignmentCenter;
    moneyLabel.font =[UIFont systemFontOfSize:36];
    [moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(headImageView.mas_bottom).with.offset(20);
        make.width.mas_equalTo(100);
        make.height.mas_equalTo(27);
        make.centerX.mas_equalTo(backView.mas_centerX);
    }];
    UILabel *infoLabel =[[UILabel alloc]init];
    [backView addSubview:infoLabel];
    infoLabel.text= @"可提现余额";
    infoLabel.textAlignment = NSTextAlignmentCenter;
    infoLabel.font =[UIFont systemFontOfSize:13];
    [infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(moneyLabel.mas_bottom).with.offset(10);
        make.width.mas_equalTo(80);
        make.height.mas_equalTo(13);
        make.centerX.mas_equalTo(backView.mas_centerX);
    }];
    
    UILabel *bankLabel =[[UILabel alloc]init];
    [backView addSubview:bankLabel];
    bankLabel.text = @"提现卡号";
    bankLabel.font =[UIFont systemFontOfSize:16];
    [bankLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(infoLabel.mas_bottom).with.offset(35);
        make.left.mas_equalTo(15);
        make.height.mas_equalTo(45);
        make.width.mas_equalTo(70);
    }];
    self.bankTextFiled =[[UITextField alloc]init];
    [backView addSubview:self.bankTextFiled];
    self.bankTextFiled.textColor = CUSTOMCOLOR;
    self.bankTextFiled.font =[UIFont systemFontOfSize:15];
    self.bankTextFiled.placeholder = @"请选择要体现的银行卡";
    [self.bankTextFiled mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(infoLabel.mas_bottom).with.offset(35);
        make.left.mas_equalTo(bankLabel.mas_right).with.offset(30);
        make.right.mas_equalTo(-50);
        make.height.mas_equalTo(45);
    }];
    UIButton *rightBtn =[UIButton buttonWithType:UIButtonTypeCustom];
    [backView addSubview:rightBtn];
    [rightBtn setImage:[UIImage imageNamed:@"you"] forState:UIControlStateNormal];
    [rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-15);
        make.height.width.mas_equalTo(24);
        make.top.mas_equalTo(infoLabel.mas_bottom).with.offset(45);
    }];
    UILabel *lineone =[[UILabel alloc]init];
    lineone.backgroundColor = BACKGROUNDCOLOR;
    [backView addSubview:lineone];
    [lineone mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
    make.top.mas_equalTo(self.bankTextFiled.mas_bottom).with.offset(5);
        make.height.mas_equalTo(0.5);
    }];
    
    UILabel *cashmoneyLabel =[[UILabel alloc]init];
    [backView addSubview:cashmoneyLabel];
    cashmoneyLabel.text = @"提现金额";
    cashmoneyLabel.font =[UIFont systemFontOfSize:16];
    [cashmoneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lineone.mas_bottom).offset(10);
        make.left.mas_equalTo(15);
        make.width.mas_equalTo(70);
        make.height.mas_equalTo(45);
    }];
    self.moneyTextFiled =[[UITextField alloc]init];
    [backView addSubview:self.moneyTextFiled];
    self.moneyTextFiled.font =[UIFont systemFontOfSize:15];
    self.moneyTextFiled.placeholder = @"输入提现金额";
    [self.moneyTextFiled mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lineone.mas_bottom).offset(10);
        make.left.mas_equalTo(cashmoneyLabel.mas_right).with.offset(30);
        make.right.mas_equalTo(-50);
        make.height.mas_equalTo(45);
    }];
    UIButton *cashBtn =[UIButton buttonWithType:UIButtonTypeCustom];
    [backView addSubview:cashBtn];
    [cashBtn setTitle:@"全部提现" forState:UIControlStateNormal];
    [cashBtn setTitleColor:CUSTOMCOLOR forState:UIControlStateNormal];
    cashBtn.titleLabel.font =[UIFont systemFontOfSize:15];
    [cashBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lineone.mas_bottom).offset(10);
        make.right.mas_equalTo(-15);
        make.height.mas_equalTo(45);
    }];
    
    
    UILabel *linetwo =[[UILabel alloc]init];
    linetwo.backgroundColor = BACKGROUNDCOLOR;
    [backView addSubview:linetwo];
    [linetwo mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
    make.top.mas_equalTo(self.moneyTextFiled.mas_bottom).with.offset(5);
        make.height.mas_equalTo(0.5);
    }];
    
    
    UILabel *passLabel =[[UILabel alloc]init];
    [backView addSubview:passLabel];
    passLabel.text = @"提现密码";
    passLabel.font =[UIFont systemFontOfSize:16];
    [passLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(linetwo.mas_bottom).offset(10);
        make.left.mas_equalTo(15);
        make.width.mas_equalTo(70);
        make.height.mas_equalTo(45);
    }];
    self.passwordTextFiled =[[UITextField alloc]init];
    [backView addSubview:self.passwordTextFiled];
    self.passwordTextFiled.font =[UIFont systemFontOfSize:15];
    self.passwordTextFiled.placeholder = @"输入提现密码";
    [self.passwordTextFiled mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(linetwo.mas_bottom).offset(10);
        make.left.mas_equalTo(passLabel.mas_right).with.offset(30);
        make.right.mas_equalTo(-50);
        make.height.mas_equalTo(45);
    }];
   

    UILabel *linethree =[[UILabel alloc]init];
    linethree.backgroundColor = BACKGROUNDCOLOR;
    [backView addSubview:linethree];
    [linethree mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(self.passwordTextFiled.mas_bottom).with.offset(5);
        make.height.mas_equalTo(0.5);
    }];
    
    
    UIButton *commitbtn =[UIButton buttonWithType:UIButtonTypeCustom];
    [backView addSubview:commitbtn];
    [commitbtn setTitle:@"确认" forState:UIControlStateNormal];
    [commitbtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    commitbtn.backgroundColor = CUSTOMCOLOR;
    commitbtn.layer.cornerRadius = 5;
    commitbtn.titleLabel.font =[UIFont systemFontOfSize:15];
    [commitbtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(linethree.mas_bottom).offset(50);
        make.left.mas_equalTo(15);
        make.right.mas_equalTo(-15);
        make.height.mas_equalTo(50);
    }];
    
    
    
    
    
    // Do any additional setup after loading the view.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
